using UnityEngine;

public class inGameTutorialGetPoints : InGameTutorialObject
{
	public string distName = string.Empty;

	public float wateUse = 4f;

	private bool started;

	public UISprite bar;

	public bool thisStep;

	public override bool OnStepStart(string name)
	{
		if (base.OnStepStart(name))
		{
			base.gameObject.SetActive(true);
			if (distName == string.Empty)
			{
				distName = Application.loadedLevelName;
			}
			started = true;
			return true;
		}
		return false;
	}

	private new void OnEnable()
	{
	}

	private new void OnDisable()
	{
		thisStep = false;
	}

	private void Update()
	{
		if ((bool)DistrictDetector.instance)
		{
			distName = DistrictDetector.instance.GetCurrentDistrictName(GameController.instance.myPlayer.transform.position);
		}
		else
		{
			distName = Application.loadedLevelName;
		}
		if (started && bar.fillAmount == 1f)
		{
			started = false;
			thisStep = true;
			BCWStorage.Set("respect_tutor_lvlName", distName);
			Invoke("Use", wateUse);
		}
	}
}
